package cn.baiy;

import javax.swing.*;

//水雷类
public class Mine  extends SeaObject{  //继承

    public Mine(int x,int y){
        super(11,11,x,y,1);
    }

    @Override
    public void move(){
        y -= speed; //水雷向上移动
        }

    @Override
    public ImageIcon getImage(){
        return Images.mine; //返回水雷图片
    }

    public boolean isOutOfBounds(){
        return y <= 150-height; //检测水雷越界
    }
}
